/*
 *  登录 
 */
import {
  getRequest,
  postRequest
} from '@/utils/axios';

export const loginApi = {
  /**
   * 登录 
   */
  login: (param) => {
    param = {
      ...param,
      action: 'jiekou_system_login_by_name_and_password'
    }
    return postRequest('/i/system/login.jsp', null, param);
  },
  /**
   * 获取人员信息 
   */
  getUserInfo: (param) => {
    param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_my_login_data'
    }
    return getRequest('/i/system/view.jsp', param);
  },
  /**
   * 密码修改 
   */
  updatePwd: (param) => {
    param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'update_password',
      ...param
    }
    return getRequest('/i/system/view.jsp', param);
  },

};